#include "mysql.h"


//获取res结果集
MYSQL_RES *mysql_get_res(MYSQL *msql,char *state){

    MYSQL_RES *result;
    if (mysql_query(msql, state)){
        fprintf(stderr, "Query failed: %s\n", mysql_error(msql));
        return (MYSQL_RES *)(-1);
    }

    result = mysql_store_result(msql);
    return result;
}
